gtk: Align key_size up to key_align
authorMatt Turner <mattst88@gmail.com>
Mon, 19 Jun 2023 19:50:04 +0000 (15:50 -0400)
committerMatt Turner <mattst88@gmail.com>
Tue, 20 Jun 2023 01:42:19 +0000 (21:42 -0400)
commita3582031576783fbc644fdd2ad914820d0ba4863
treea53b906aa2072483d4ee331136bd97deb2730f65
parent00cdaba5a89eedb6f7334bdfa523e374e5dc4b12
gtk: Align key_size up to key_align

Avoids unaligned accesses when e.g. the key_size is 12 and key_align is
8. We need to round the key size up to 16 to ensure that all keys are
appropriately aligned.

This manifested as a failure in the `gtk:gtk / sorter` unit test on
sparc.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5907
(cherry picked from commit 3f360aa883dc51ad986c721be01b494020e5ac9d)
gtk/gtkmultisorter.c
gtk/gtksortlistmodel.c